import request from '@/utils/request'
import QueryString from 'qs'


export function authorityList(params,type) {
    
    return request({
        url: `/pass/api/${type}/authority/list`,
        method: 'get',
        params
    })
}

export function authorityUpdate(data,type) {
    
    return request({
        url: `/pass/api/${type}/authority/update`,
        method: 'put',
        data:QueryString.stringify(data)
    })
}

export function authorityDetail(params,type) {
    
    return request({
        url: `/pass/api/${type}/authority/detail`,
        method: 'get',
        params
    })
}

export function authorityDelete(params,type) {
    
    return request({
        url: `/pass/api/${type}/authority/delete`,
        method: 'delete',
        params
    })
}

export function authorityAdd(data,type) {
    
    return request({
        url: `/pass/api/${type}/authority/add`,
        method: 'post',
        data
    })
}